import binance.model.*
class BootStrap {

    def init = { servletContext ->
        def u = User.findByEmail("tomasbjerre@yahoo.com")
        if (!u) {
            u = new User(email:"tomasbjerre@yahoo.com",password:"123456").save()
            u.save()
        }

        /*
        def c = new Currency(sek:1,code:"SEK")
        c.save()

        def sm = new Stockmarket(code:"US",name:"USA")
        sm.save()

        def sl = new Stocklist(code:"USNS",stockmarket:sm)
        sl.save()

        def s = new Stock(url:"",value:1,highest:1,lowest:1,time:"",code:"OX",name:"Orexo",diff:1,diffproc:1,currency:c,stocklist:sl)
        s.save()
        
        def b = new Buy(price: 1,target:10, count: 20, user:u, stock: s)
        b.save()

        def se = new Sell(price: 2,count: 2, buy:b)
        se.save()
         */
    }
    def destroy = {
         
    }
} 
